package cn.gqr.uitl;

import cn.gqr.entity.User;
import org.springframework.security.core.context.SecurityContextHolder;

public class SessionUitl {

    public static User user(){
        Object obj = SecurityContextHolder.getContext()
                .getAuthentication().getPrincipal();
        return (User) obj;
    }

}
